package com.sali.constants;

/**
 * @description:
 * @author: sali
 * @date: 2025/2/21 上午12:10.
 * @version: 1.0
 */
public class CommonConstant {

    public static class Netty {
        // 默认访问成功code码
        public static final String RESULT_CODE_SUCCESS = "0";

        //  负责接收客户端请求线程最小数
        public static final int BOSS_GROUP_MIN = 1;

        // 负责接收客户端请求线程最大数
        public static final int BOSS_GROUP_MAX = 5;

        // 负责处理客户端读写请求线程最小数
        public static final int WORKER_GROUP_MIN = 4;

        // 负责处理客户端读写请求线程最大数
        public static final int WORKER_GROUP_MAX = 10;

        // 读取超时次数
        public static final int READIDLE_COUNT = 10;
    }

    public static class Flag {
        // 心跳flag
        public static final byte HEARTBEAT_FLAG = 0xA;

        // 业务flag
        public static final byte BUSINESS_FLAG = 0xC;
    }

    // 心跳回复消息
    public static final String HEARTHEAT_REPLY = "pong";

    // 读取超时次数
    public static final int READIDLE_COUNT = 10;

}
